from insts.inst import NoOperandInstruction
from insts.math.ope import OPE
from jthread.operand_stack import OperandStack


class IADD(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'and'


class LADD(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'and'


class FADD(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'float'
        self.operation = 'add'


class DADD(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'double'
        self.operation = 'add'


class IAND(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'and'


class LAND(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'and'


class IDIV(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'div'


class LDIV(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'div'


class FDIV(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'float'
        self.operation = 'div'


class DDIV(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'double'
        self.operation = 'div'


class IMUL(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'mul'


class LMUL(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'mul'


class FMUL(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'float'
        self.operation = 'mul'


class DMUL(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'double'
        self.operation = 'mul'


class IOR(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'or'


class LOR(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'or'


class INEG(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'neg'


class LNEG(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'neg'


class FNEG(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'float'
        self.operation = 'neg'


class DNEG(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'double'
        self.operation = 'neg'


class IREM(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'rem'


class LREM(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'rem'


class FREM(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'float'
        self.operation = 'rem'


class DREM(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'double'
        self.operation = 'rem'


class ISUB(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'sub'


class LSUB(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'sub'


class FSUB(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'float'
        self.operation = 'sub'


class DSUB(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'double'
        self.operation = 'sub'


class IXOR(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'xor'


class LXOR(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'xor'


class ISHL(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'lsh'


class LSHL(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'lsh'


class ISHR(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'rsh'


class LSHR(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'rsh'


class IUSHR(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'int'
        self.operation = 'ursh'


class LUSHR(OPE):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.kind = 'long'
        self.operation = 'ursh'
